﻿<?xml version="1.0"?>
<!--
  * SPPackager.SPDeploy.SchemaDeploy.xml - Perform the instalation, upgrade and retraction of Ms Sharepoint Applications fast, easy and efficient
  * XML version 2.9 - jun, 7th of 2013
  * Script version 5.3 - May, 13th of 2013
  * Frederico Souza Lima (fredericosl@hotmail.com)
  * Michael Capela (michaelcapela@hotmail.com)
  * Copyright (c) 2012-2013
-->
<Deploy>
  <GlobalFarmSolutions>
    <!-- Global Farm Solutions are those that are installed on all servers in the farm, this situation is necessary depending on the content of the solution file. -->
    <!-- SandBox Proxy Solutions, in the case of reinstallation, always depend on service restart "SharePoint 2010 User Code Host". -->
    <!-- Farm Solutions in case of reinstallation, always depend on service restart "SharePoint 2010 Timer". -->   
    <GlobalFarmSolution Name="string" DeployMode="Deploy | ReDeploy | Remove" WSPName="string" RestartUserCode="boolean" RestartTimer="boolean" />
  </GlobalFarmSolutions>
  <ChainedFarmFeatures>
    <!-- Use the activation of linked resources to order the activation of the Farm Features. --> 
    <!-- This setting is also interesting to force the activation or deactivation of resources, because Ms Sharepoint may fail in achieving this automatic action in the case of a solution reinstallation.--> 
    <!-- The ExternalProcess option must be used to bypass problems preloading DLLs solutions by Porwershell. In case of a reinstalation, the previous DLL may retain loaded into the current Powershell memory space, requiring the resource handling to be performed in another process.--> 
    <ChainedFarmFeature Name="string" Id="guid" ExternalProcess="boolean" DeployMode="Activate | Deactivate | Reactivate" />
  </ChainedFarmFeatures>
  <WebApplications>
    <!-- Due to safety issues, Create and DropExisting options are not addressed by the application, this prevents a disaster or incorrect settingse from happening.-->
    <WebApplication Name="string" DropExisting="boolean" Create="boolean" DisableCoauthoring="boolean" BrowserFileHandling="Permissive | Strict" MaxQueryLookupFields="integer">
      <WebConfigModifications>
        <!-- Perform changes to the web.config of the Web Application using SPWebConfigMofification
                    Type: SetAttributeValue (changes the value of an attribute)
                    Path: The path of the XML web.config file
                    Name: Name of the Attribute
                    Value: Value of the Attribute
                    Owner: Establish the owner identity, to be identifiable in case of removal
                    Action:
                       Install (perform the change)
                       Uninstall (undo the change)-->
        <WebConfigModification Type="string" Path="string" Name="string" Value="string" Owner="string" Action="string"/>
      </WebConfigModifications>
      <ManagedPaths>
         <!--Beware, of the existence of site collections under the managed path, they will automatically be deleted, if Drop is specified to the DeployMode--> 
         <!--It is not necessary to create the managed path directly (here), it can be created automatically when creating a site collection or a site--> 
        <ManagedPath MamagedPathUrl="/string" DeployMode="Create | Drop" Explicit="boolean"/>
    </ManagedPaths>
      <WebApplicationFarmSolutions>
         <!-- Be careful when specifing redeploy on previously installed web applications, the solution will be removed from the previous web applications--> 
         <!-- Avoiding problems DLLs trapped in Timer--> 
         <!-- On this moment, It would be ideal to restart the Sharepoint Timer service on all servers in the farm--> 
        <WebApplicationFarmSolution Name="string" DeployMode="Deploy | ReDeploy | Remove" WSPName="string" GACDeployment="boolean" RestartTimer="boolean" />          
      </WebApplicationFarmSolutions>
      <SiteCollections>
        <SiteCollection Name="string" DropExisting="boolean" Create="boolean" Language="integer" Template="string" Description="string" ConfigureDefaultGroups="boolean" ParserEnabled="boolean">
          <SiteCollectionAdmins>
            <!--The format to be used to login is domain \ user or domain \ group -->
            <NetworkUserOrGroup Login="string" />
          </SiteCollectionAdmins>
          <PermissionLevels>
            <PermissionLevel Name="string" Description="string" permissions="string"/>
          </PermissionLevels>
          <Groups>
            <Group Name="string" Description="string">
              <NetworkUserOrGroups>
                <!--The format to be used to login is domain \ user or domain \ group -->
                <NetworkUserOrGroup Login="string" />
              </NetworkUserOrGroups>
            </Group>
          </Groups>
          <SiteProperties>
            <!--There is the possibility of using tokens for the values, for example:--> 
            <!--WebApplications[string].URL retrieves the URL of a web application within the HostedApplications.xml--> 
            <!--WebApplications[string].SiteCollections[string].URL retrieves the URL of a site collection within the HostedApplications.xml--> 
            <SiteProperty Name="string" Value="string | WebApplications[string].URL] | WebApplications[string].SiteCollections[string].URL" />
          </SiteProperties>
          <BuiltInSiteFeatures>
            <BuiltInSiteFeature Name="string" Id="guid"  DeployMode="Activate | Deactivate | Reactivate"/>
          </BuiltInSiteFeatures>
          <BuiltInWebSiteFeatures>
            <BuiltInWebSiteFeature Name="string" Id="guid"  DeployMode="Activate | Deactivate | Reactivate"/>
          </BuiltInWebSiteFeatures>
          <SandboxSolutions>
            <SandboxSolution Name="string" DeployMode="Deploy | ReDeploy | Remove"  WSPName="string"/>
          </SandboxSolutions>
          <SandboxSiteFeatures>
            <SandboxSiteFeature Name="string" Id="guid"  DeployMode="Activate | Deactivate | Reactivate"/>
          </SandboxSiteFeatures>
          <SandboxWebSiteFeatures>
            <SandboxWebSiteFeature Name="string" Id="guid"  DeployMode="Activate | Deactivate | Reactivate"/>
          </SandboxWebSiteFeatures>
          <WebSiteExtensionActions>                      
            <!-- The extensions should be used to execute spacial commands on a site, the available commands are: -->
            <!-- SetupMaster to set up the default and custom master page, the master page must exists in the masterpage library-->
            <!-- SetupCSS to set up the css style on a site, the css file must exists in the Style Library folder -->
            <!-- SetupSiteLogo to set up the site logo, the logo must exists in the 'images' folder under Style Library -->
            <!-- PublishAndApproveFilesRecursive to perform the checkin and publication of all files within site -->
            <!-- SetUserCodeWebPartProperties, to set up properties of a WebPart in any page -->
            <!-- ReplaceTextInFile to replace text within any page, commonly used for masterpages -->

            <!-- There is the possibility of using tokens for the values, for example: -->
            <!-- WebApplications[string].URL retrieves the URL of a web application within the HostedApplications.xml -->
            <!-- WebApplications[string].Retrieves the ID GUID of a web application from the URL in HostedApplications.xml -->
            <!-- WebApplications[string].SiteCollections [string].Url retrieves the URL of a site collection within the HostedApplications.xml -->
            <!-- WebApplications[string].SiteCollections [string].ServerRelativeUrl retrieves the URL of a site collection within the HostedApplications.xml -->
            <!-- Lists[string].Id retrieves the list ID of a website as string format -->
            <!-- URLEncode[string] encodes the URL as formatted string -->                         
            <WebSiteExtensionAction Action="SetupMaster" MasterName="string" CustomMasterName="string" MasterInherit="boolean" MasterForceAllSubWebInherit="boolean" CustomMasterInherit="boolean" CustomMasterForceAllSubWebInherit="boolean"/>
            <WebSiteExtensionAction Action="SetupCSS" CSSName="string" CSSInherit="boolean" CSSForceAllSubWebInherit="boolean" />
            <WebSiteExtensionAction Action="SetupSiteLogo" SiteLogoName="string" SiteLogoDescription="string"  />
            <WebSiteExtensionAction Action="SetUserCodeWebPartProperties" PageWebRelativeUrl="string" WebPartID="string" PropertiesNamesArray="string" PropertiesValuesArray="string*" ArraySeparator="char"/>
            <WebSiteExtensionAction Action="ReplaceTextInFile" FileRelativeUrl="string" FindText="string" ReplaceValue="string*"/>
            <WebSiteExtensionAction Action="PublishAndApproveFilesRecursive" />
          </WebSiteExtensionActions>
          <WebSites>          
            <!-- Be careful when specifying DropExisting on the root site of the site collection. In this way, the entire site collection will be deleted. 
                    Therefore, do not specify the root site in the list of site collection sites. After all, it was already created along with the site collection -->
            <!-- The configuration of AllSubWebs and Subwebs Types, requires no further configuration for the WebSite node, they should be only used to perform batch operations on multiple sites. 
                    Example: Activation of a Feature in AllSubWebs -->
            <WebSite Type="SingleWeb | AllSubWebs | SubWebs" Name="string" URL="/string" DropExisting="False|True" Create="boolean" Language="0" Template="string" Description="string" ConfigureDefaultGroups="boolean" ParserEnabled="boolean">
                <Groups>
                  <Group Name="string" Description="string">
                    <NetworkUserOrGroups>
                      <!--The format to be used to login is domain \ user or domain \ group -->
                      <NetworkUserOrGroup Login="string" />
                    </NetworkUserOrGroups>
                  </Group>
                </Groups>
                <SiteProperties>
                  <!-- There is the possibility of using tokens for the values, for example: -->
                  <!-- WebApplications [string].URL retrieves the URL of a web application within the HostedApplications.xml -->
                  <!-- WebApplications [string].SiteCollections[string].URL retrieves the URL of a site collection within the HostedApplications.xml -->
                  <SiteProperty Name="string" Value="string | WebApplications[string].URL] | WebApplications[string].SiteCollections[string].URL" />
                </SiteProperties>
                <BuiltInSiteFeatures>
                  <BuiltInSiteFeature Name="string" Id="guid"  DeployMode="Activate | Deactivate | Reactivate"/>
                </BuiltInSiteFeatures>
                <BuiltInWebSiteFeatures>
                  <BuiltInWebSiteFeature Name="string" Id="guid"  DeployMode="Activate | Deactivate | Reactivate"/>
                </BuiltInWebSiteFeatures>
                <WebSiteExtensionActions>
                  <!-- The extensions should be used to execute spacial commands on a site, the available commands are: -->
                  <!-- SetupMaster to set up the default and custom master page, the master page must exists in the masterpage library-->
                  <!-- SetupCSS to set up the css style on a site, the css file must exists in the Style Library folder -->
                  <!-- SetupSiteLogo to set up the site logo, the logo must exists in the 'images' folder under Style Library -->
                  <!-- PublishAndApproveFilesRecursive to perform the checkin and publication of all files within site -->
                  <!-- SetUserCodeWebPartProperties, to set up properties of a WebPart in any page -->
                  <!-- ReplaceTextInFile to replace text within any page, commonly used for masterpages -->

                  <!-- There is the possibility of using tokens for the values, for example: -->
                  <!-- WebApplications[string].URL retrieves the URL of a web application within the HostedApplications.xml -->
                  <!-- WebApplications[string].Retrieves the ID GUID of a web application from the URL in HostedApplications.xml -->
                  <!-- WebApplications[string].SiteCollections [string].Url retrieves the URL of a site collection within the HostedApplications.xml -->
                  <!-- WebApplications[string].SiteCollections [string].ServerRelativeUrl retrieves the URL of a site collection within the HostedApplications.xml -->
                  <!-- Lists[string].Id retrieves the list ID of a website as string format -->
                  <!-- URLEncode[string] encodes the URL as formatted string -->
                  <WebSiteExtensionAction Action="SetupMaster" MasterName="string" CustomMasterName="string" MasterInherit="boolean" MasterForceAllSubWebInherit="boolean" CustomMasterInherit="boolean" CustomMasterForceAllSubWebInherit="boolean"/>
                  <WebSiteExtensionAction Action="SetupCSS" CSSName="string" CSSInherit="boolean" CSSForceAllSubWebInherit="boolean" />
                  <WebSiteExtensionAction Action="SetupSiteLogo" SiteLogoName="string" SiteLogoDescription="string"  />
                  <WebSiteExtensionAction Action="SetWebPartProperty" PageWebRelativeUrl="string" WebPartID="string" PropertyName="string" PropertyValue="string*"/>
                  <WebSiteExtensionAction Action="ReplaceTextInFile" FileRelativeUrl="string" FindText="string" ReplaceValue="string*"/>
                  <WebSiteExtensionAction Action="PublishAndApproveFilesRecursive" />
                </WebSiteExtensionActions>
            </WebSite>
          </WebSites>
          <ChainedFeatures>
            <!-- Use the activation of linked resources to order the activation of Site Features on the same site collection -->
            <ChainedFeature Type="Sandbox | Farm" Scope="Site | Web" Name="string" Id="guid" SiteURL="empty | string" ExternalProcess="boolean" DeployMode="Activate | Deactivate | Activate" />
          </ChainedFeatures>
        </SiteCollection>
        </SiteCollections>
    </WebApplication>
  </WebApplications>
</Deploy>
